/*
*  Copyright 2019-2020 Zheng Jie
*
*  Licensed under the Apache License, Version 2.0 (the "License");
*  you may not use this file except in compliance with the License.
*  You may obtain a copy of the License at
*
*  http://www.apache.org/licenses/LICENSE-2.0
*
*  Unless required by applicable law or agreed to in writing, software
*  distributed under the License is distributed on an "AS IS" BASIS,
*  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*  See the License for the specific language governing permissions and
*  limitations under the License.
*/
package me.zhengjie.modules.cspimp.mhm.domain;

import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import me.zhengjie.base.BaseCspImpEntity;
import me.zhengjie.base.BaseEntity;

import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;

/**
* @website https://docs.auauz.net
* @description /
* @author 黄星星
* @date 2020-05-30
**/
@Entity
@Data
@Table(name="mhm_reservoir_area_manage")
public class ReservoirAreaManage extends BaseCspImpEntity implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    @ApiModelProperty(value = "主键")
    private Long id;


    @Column(name = "reservoir_area_name")
    @ApiModelProperty(value = "库区名称")
    private String reservoirAreaName;

    @Column(name = "warehouse_number")
    @ApiModelProperty(value = "库房数量")
    private String warehouseNumber;

    @Column(name = "warehouse_serial_number")
    @ApiModelProperty(value = "库房序号")
    private String warehouseSerialNumber;

    @Column(name = "warehouse_name")
    @ApiModelProperty(value = "库房名称")
    private String warehouseName;

    @Column(name = "warehouse_modus")
    @ApiModelProperty(value = "库房形式")
    private String warehouseModus;

    @Column(name = "warehouse_structure")
    @ApiModelProperty(value = "库房结构")
    private String warehouseStructure;

    @Column(name = "storage_type")
    @ApiModelProperty(value = "储存类型")
    private String storageType;

    @Column(name = "storage_number")
    @ApiModelProperty(value = "储存量")
    private String storageNumber;

    @Column(name = "audit_cycle")
    @ApiModelProperty(value = "审核周期")
    private String auditCycle;

    @Column(name = "fire_level")
    @ApiModelProperty(value = "火灾等级")
    private String fireLevel;

    @Column(name = "last_audit_time")
    @ApiModelProperty(value = "上次审核时间")
    private Timestamp lastAuditTime;

    public void copy(ReservoirAreaManage source){
        BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
    }
}